<?php
C_base::yn_file('m'.DS.'Model.php');
class materialModel extends model{
	
	function cha($mid,$w){
		return $this->material($mid)->w($w)->s();
	}
	
	function xie($mid,$c){
		return $this->material($mid)->c($c);
	}
	
	function shan($mid,$w){
		return $this->material($mid)->w($w)->d();
	}
	
	/**
	 * 素材数据库
	 */
	function material($mid){
		$biao = 'material_'.util::end2($mid);
		return $this->db_material()->$biao;
	}
	
}